package com.jeff.tianti.cms.dao;

import com.jeff.tianti.cms.entity.Company;
import com.jeff.tianti.common.dao.CommonDao;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author xujianfang
 * @desc CompanyDao�ӿ�
 * @date 2019-07-15
 */
public interface CompanyDao extends CompanyDaoCustom, CommonDao<Company, String> {
    //    审核通过
    @Query(" from Company c where c.deleteFlag = 0  and c.auditFlag = 2")
    Page<Company> findAllNoDel(Pageable pageable);
    @Query(" from Company c where c.uid = ?1 and c.auditFlag = 2 and c.deleteFlag = 0")
    List<Company> findByUid(String uid);

    @Query(" from Company c where c.uid = ?1 and c.deleteFlag = 0")
    List<Company> findByUidNoDel(String uid);
}